<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>index</title>
        <link href="script/seminar.css" rel="stylesheet">
        <script type="text/javascript">
            function framebreakout() {
                if (top.location != location) {
                    top.location.href = document.location.href ;
                }
            }
            function fnSubmit() {
                document.indexForm.method = 'POST';
                document.indexForm.action = 'logic/login.php';
                document.indexForm.submit();
            }
        </script>
    </head>
    <body onload="framebreakout()">
        <form name="indexForm" id="indexForm">
        <table border="0" width="100%" height="100%" cellpadding="0" cellspacing="0">
            <tr class="tbl-header">
                <td colspan="2">&nbsp;</td>
            </tr>
            <tr class="tbl-header">
                <td align="center" colspan="2">
                    <font style="font-size: 32px; font-weight: bold">Sistem Manajemen Seminar</font>
                </td>
            </tr>
            <tr class="tbl-header">
                <td colspan="2">&nbsp;</td>
            </tr>
            <tr>
                <td bgcolor="beige" align="center" colspan="2">
                    [&nbsp;<a href="#">&nbsp;Beranda&nbsp;</a>&nbsp;]&nbsp;
                    [&nbsp;<a href="#">&nbsp;Tentang&nbsp;Kami&nbsp;</a>&nbsp;]&nbsp;
                    [&nbsp;<a href="#">&nbsp;Kontak&nbsp;</a>&nbsp;]&nbsp;
                    [&nbsp;<a href="#">&nbsp;Bantuan&nbsp;</a>&nbsp;]&nbsp;
                </td>
            </tr>
            <tr>
                <td>&nbsp;</td>
            </tr>
            <tr valign="top">
                <td valign="top" width="100%" rowspan="2">
                    <!-- bagian utama -->
                    <table border="0" cellpadding="2" cellspacing="2">
                        <?php
                        include("utility/connection.php");
                        include("utility/general.php");
                        include("model/mSeminar.php");
                        session_start();
                        $infoSeminarAktif = fnInfoSeminarAktif();
                        if ($infoSeminarAktif) {
                            while($rowSeminarAktif = mysql_fetch_row($infoSeminarAktif)){
                                $Tema = $rowSeminarAktif[1];
                                $DetilTema = $rowSeminarAktif[2];
                                $Tempat = $rowSeminarAktif[3];
                                
                                $Tanggal = $rowSeminarAktif[4];
                                $digitTgl = substr($Tanggal,-2,2);
                                $digitBulan = fnConvertMonth(substr($Tanggal,-5,2));
                                $digitTahun = substr($Tanggal,0,4);
                                $Tgl = $digitTgl.' '.$digitBulan.' '.$digitTahun;
                                
                                $Waktu = $rowSeminarAktif[5];
                                
                                $TglAwalDaftar = $rowSeminarAktif[6];
                                $digitTgl1 = substr($TglAwalDaftar,-2,2);
                                $digitBulan1 = fnConvertMonth(substr($TglAwalDaftar,-5,2));
                                $digitTahun1 = substr($TglAwalDaftar,0,4);
                                $TglDaftar1 = $digitTgl1.' '.$digitBulan1.' '.$digitTahun1;
                                
                                $TglAkhirDaftar = $rowSeminarAktif[7];
                                $digitTgl2 = substr($TglAkhirDaftar,-2,2);
                                $digitBulan2 = fnConvertMonth(substr($TglAkhirDaftar,-5,2));
                                $digitTahun2 = substr($TglAkhirDaftar,0,4);
                                $TglDaftar2 = $digitTgl2.' '.$digitBulan2.' '.$digitTahun2;
                        ?>
                        <tr>            
                            <td>
                                <table border="0" cellpadding="2" cellspacing="2">
                                    <tr>
                                        <td>Topik</td>
                                        <td>&nbsp;:&nbsp;</td>
                                        <td><?php echo $Tema ?></td>
                                    </tr>
                                    <tr>
                                        <td>Detail&nbsp;Topik</td>
                                        <td>&nbsp;:&nbsp;</td>
                                        <td><?php echo $DetilTema ?></td>
                                    </tr>
                                    <tr>
                                        <td>Tempat</td>
                                        <td>&nbsp;:&nbsp;</td>
                                        <td><?php echo $Tempat ?></td>
                                    </tr>
                                    <tr>
                                        <td>Tanggal</td>
                                        <td>&nbsp;:&nbsp;</td>
                                        <td><?php echo $Tgl ?></td>
                                    </tr>
                                    <tr>
                                        <td>Waktu</td>
                                        <td>&nbsp;:&nbsp;</td>
                                        <td><?php echo $Waktu ?></td>
                                    </tr>
                                    <tr>
                                        <td>Pendaftaran</td>
                                        <td>&nbsp;:&nbsp;</td>
                                        <td><?php echo $TglDaftar1 ?>&nbsp;s.d.&nbsp;<?php echo $TglDaftar2 ?></td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <hr>
                            </td>
                        </tr>
                        <?php
                            }
                        }
                        ?>
                    </table>
                </td>
                <td valign="top" align="center">
                    <!-- form login -->
                    <table border="1" cellpadding="2" cellspacing="0">
                        <tr valign="top">
                            <td align="center">
                                <?php
                                //session_start();
                                if (isset($_SESSION['relogin'])) {
                                    include("logic/session_message.php"); 
                                }
                                ?>
                                <table border="0" cellpadding="5" cellspacing="0">
                                    <tr class="tbl-header"><td colspan="3">LOGIN</td></tr>
                                    <tr class="tbl-body"><td>Login ID</td><td>&nbsp;:&nbsp;</td><td><input type="text" name="txtLoginId" id="txtLoginId" size="20" maxlength="10"></td></tr>
                                    <tr class="tbl-body"><td>Password</td><td>&nbsp;:&nbsp;</td><td><input type="text" name="txtPassword" id="txtPassword" size="20" maxlength="10"></td></tr>
                                    <tr class="tbl-body">
                                        <td colspan="3">
                                            <button type="button" name="btSubmit" id="btSubmit" onclick="fnSubmit()">Submit</button>&nbsp;
                                            <button type="reset" name="btCancel" id="btCancel">Cancel</button>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr valign="top">
                            <td align="center" bgcolor="beige" >
                                <font class="footer">klik di <a href="ui/user/newUser.php">sini</a> untuk mendaftar</font>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td valign="top" align="left">
                    <!-- menu kanan bawah -->
                    <p align="justify">
                    "But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain 
                    was born and I will give you a complete account of the system, and expound the actual teachings 
                    of the great explorer of the truth, the master-builder of human happiness. No one rejects, 
                    dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know 
                    how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again 
                    is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, 
                    but because occasionally circumstances occur in which toil and pain can procure him some great 
                    pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, 
                    except to obtain some advantage from it? But who has any right to find fault with a man who 
                    chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that 
                    produces no resultant pleasure?"
                    </p>
                </td>
            </tr>
        </table>
        </form>
    </body>
</html>
